package com.novelastudios.patterns.presenters
{
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	/**
	 * Use this as a base class for all presenters in a given application
	 * 
	 * @author John Bailey ©2009
	 * 
	 */	
	public class Presenter extends EventDispatcher
	{
		
		///////////////////////////////////////////////////////////////////////////////
		//								ACCESSORS
		///////////////////////////////////////////////////////////////////////////////
		
		///////////////////////////////
		//-------------------------
		//	dispatcher
		//-------------------------
		/**
		 * @private 
		 */		
		private var _dispatcher:IEventDispatcher;
		/**
		 * Used for setting the relative Mate dispatcher and is injected
		 */		
		public function get dispatcher():IEventDispatcher
		{
			return _dispatcher;
		}
		
		public function set dispatcher(value:IEventDispatcher):void
		{
			_dispatcher = value;
		}
		
		
		///////////////////////////////
		//-------------------------
		//	bubbleEvents
		//-------------------------
		/**
		 * @private 
		 */	
		private var _bubbleEvents:Boolean;
		/**
		 * Whether or not events intended for external listening will bubble
		 *  
		 * @return 
		 * 
		 */		
		public function get bubbleEvents():Boolean
		{
			return _bubbleEvents;
		}
		
		public function set bubbleEvents(value:Boolean):void
		{
			_bubbleEvents = value;
		}
		
	}
}